/*
package com.ailargemodel.common.rabbitmq;
  
import org.springframework.amqp.rabbit.annotation.RabbitListener;  
import org.springframework.stereotype.Component;  
  
import java.util.concurrent.ExecutorService;  
import java.util.concurrent.Executors;  
  
@Component  
public class MessageConsumer {  
  
    private final ExecutorService executorService = Executors.newFixedThreadPool(10); // Adjust the pool size as needed  
  
    @RabbitListener(queues = RabbitMQConfig.QUEUE_NAME)  
    public void receiveMessage(String message) {  
        executorService.submit(() -> {  
            try {  
                // Process the message here  
                System.out.println("Processing message: " + message);  
                // Simulate work with sleep  
                Thread.sleep(2000);  
                System.out.println("Message processed: " + message);  
            } catch (InterruptedException e) {  
                Thread.currentThread().interrupt();  
                System.err.println("Message processing interrupted: " + message);  
            }  
        });  
    }  
}*/
